using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BillCodeRuleMap : EntityTypeConfiguration<t_BillCodeRule>
    {
        public t_BillCodeRuleMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FBillTypeID)
                .IsRequired()
                .HasMaxLength(12);

            this.Property(t => t.FProjectVal)
                .IsRequired()
                .HasMaxLength(80);

            this.Property(t => t.FAddChar)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FReChar)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FBillType)
                .IsRequired()
                .HasMaxLength(12);

            // Table & Column Mappings
            this.ToTable("t_BillCodeRule");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FBillTypeID).HasColumnName("FBillTypeID");
            this.Property(t => t.FClassIndex).HasColumnName("FClassIndex");
            this.Property(t => t.FProjectID).HasColumnName("FProjectID");
            this.Property(t => t.FProjectVal).HasColumnName("FProjectVal");
            this.Property(t => t.FFormatIndex).HasColumnName("FFormatIndex");
            this.Property(t => t.FLength).HasColumnName("FLength");
            this.Property(t => t.FAddChar).HasColumnName("FAddChar");
            this.Property(t => t.FReChar).HasColumnName("FReChar");
            this.Property(t => t.FBillType).HasColumnName("FBillType");
            this.Property(t => t.FIsBy).HasColumnName("FIsBy");
        }
    }
}
